from flask import Flask
# from app.models.base import db

def create_app():
    app=Flask(__name__)
    app.config.from_object("app.secure")#载入配置文件，还没读取
    app.config.from_object("app.setting")#载入配置文件，还没读取
    register_blueprint(app)#将蓝图与核心对象关联，核心对象类似于插线板，蓝图对接核心对象，视图对接蓝图
    # db.init_app(app)
    return app

def register_blueprint(app):
    from app.web import web
    app.register_blueprint(web)